home *** CD-ROM | disk | FTP | other *** search
- /*
- ### create auto text window ###
- */
-
- #include <suntool/sunview.h>
- #include <suntool/panel.h>
- #include <suntool/textsw.h>
-
-
- void create_auto_textsw_window()
- {
-
- extern Frame auto_frame;
- extern Textsw auto_textsw;
- extern Textsw_status auto_status;
- extern char string[],string2[],auto_dir_name[],auto_file_name[],auto_input_name[];
-
- sprintf(string,"%s/%s",auto_dir_name,auto_input_name);
- auto_textsw = window_create(auto_frame, TEXTSW,
- 0);
- if(auto_textsw == NULL){
- system_mess_proc(1,"No more windows. Clean up some windows to make room.");
- (void) destroy_auto_windows();
- return;
- }
- window_set(auto_textsw,
- TEXTSW_STATUS, &auto_status,
- TEXTSW_FILE,string,
- TEXTSW_FIRST,0,
- 0);
- if(auto_status == TEXTSW_STATUS_CANNOT_OPEN_INPUT){
- sprintf(string2,"File (%s) does not exist!\n",string);
- system_mess_proc(1,string2);
- }
-
- }
-
-